/** When your routing table is too long, you can split it into small modules**/
import pageComponentName from '@/config/page-component-name'
import Layout from '@/layout/index.vue'

const userRouter = [
  {
    path: '/user',
    component: Layout,
    name: 'user',
    // meta: { title: '客户档案', icon: 'User' },
    children: [
      {
        path: 'new',
        component: () => import('@/views/users/new/index.vue'),
        name: 'newUser',
        meta: {
          title: '新增客户',
          keepAlive: true,
          componentName: pageComponentName.customer.customerCreate,
        },
        hidden: true,
      },
      {
        path: 'list',
        component: () => import('@/views/users/list/index.vue'),
        name: 'userList',
        meta: {
          title: '客户档案',
          icon: 'User',
          keepAlive: true,
          componentName: pageComponentName.customer.customerList,
        },
      },
      {
        path: 'userdetail/:id',
        component: () => import('@/views/users/detail/index.vue'),
        name: 'userDetail',
        meta: {
          title: '客户详情',
          keepAlive: true,
          componentName: pageComponentName.customer.customerDetail,
        },
        hidden: true,
      },
      {
        path: 'userExcelImport',
        component: () => import('@/views/excel/index.vue'),
        name: 'userExcelImport',
        meta: {
          title: '客户档案导入',
          keepAlive: true,
          componentName: pageComponentName.common.import,
        },
        hidden: true,
      },
    ],
  },
]

export default userRouter
